﻿<script type="text/javascript">
    $(function() {
        $("#bangfang_chaxun_rizhi").click(function() {
            //查询
            var dateKaiShi = $("#bangfang_date_kaishi_rizhi").datetimebox('getValue');
            var dateJieShu = $("#bangfang_date_jieshu_rizhi").datetimebox('getValue');

            $("#bangfang_rizhi").datagrid("load", { zhandian: $("#bangfang_zhandian_rizhi").combobox('getValue'), kaishishijian: dateKaiShi, jieshushijian: dateJieShu, uid: window.uid, kid: window.kid });
        });
        $("#bangfang_daochu_rizhi").click(function() {
            //导出
            var dateKaiShi = $("#bangfang_date_kaishi_rizhi").datetimebox('getValue');
            var dateJieShu = $("#bangfang_date_jieshu_rizhi").datetimebox('getValue');
            var zhandianStr = $("#bangfang_zhandian_rizhi").combobox('getValue').replace('#', '_');
            var yongHu = $("#currentUser").text();
            window.open(encodeURI("http://keaomds.com:10001/?uid=" + window.uid + "&kid=" + window.kid + "&requestType=7&keHuBianHao=" + window.kehubianhao + "&zhandian=" + zhandianStr + "&kaishishijian=" + dateKaiShi + "&jieshushijian=" + dateJieShu + "&yonghu=" + yongHu));
        });

        $("#bangfang_zhandian_rizhi").combobox({
            url: 'json/zhandian.json',
            method: 'get',
            valueField: 'zhandian',
            textField: 'zhandian',
            panelWidth: 175,
            panelHeight: 'auto',
            editable: false,
            onLoadSuccess: function() {
                $("#bangfang_rizhi").datagrid({ url: "handler/rizhi.ashx", method: "get", queryParams: { zhandian: $("#bangfang_zhandian_rizhi").combobox('getValue'), kaishishijian: $("#bangfang_date_kaishi_rizhi").datetimebox('getValue'), jieshushijian: $("#bangfang_date_jieshu_rizhi").datetimebox('getValue'), uid: window.uid, kid: window.kid }, height: document.body.scrollHeight - 180 });
            }
        });

    });

    $.parser.onComplete = function() {
        var d = new Date();
        $("#bangfang_date_kaishi_rizhi").datebox('setValue', d.toLocaleDateString());
        $("#bangfang_date_jieshu_rizhi").datebox('setValue', d.toLocaleDateString());
    }
</script>

<div class="easyui-panel" data-options="height:90,border:false" title="数据检索" style="border-top-width: 0px;
    border-bottom-width: 1px; padding: 15px">
    <table style="font-size: 12px;">
        <tr>
            <td>
                站点：
            </td>
            <td>
                <input class="" name="bangfang_zhandian_rizhi" id="bangfang_zhandian_rizhi" style="width: 175px;" />
            </td>
            <td>
                称重时间：
            </td>
            <td>
                <input id="bangfang_date_kaishi_rizhi" type="text" class="easyui-datebox" data-options="required:true"
                    style="width: 175px">
            </td>
            <td>
                至
            </td>
            <td>
                <input id="bangfang_date_jieshu_rizhi" type="text" class="easyui-datebox" data-options="required:true"
                    style="width: 175px">
            </td>
            <td>
                <a id="bangfang_chaxun_rizhi" class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                    style="width: 60px; margin-left: 20px;">查询</a>
            </td>
            <td>
                <a id="bangfang_daochu_rizhi" class="easyui-linkbutton" data-options="iconCls:'icon-export-16'"
                    style="width: 60px">导出</a>
            </td>
        </tr>
    </table>
</div>
<table id="bangfang_rizhi" class="easyui-datagrid" title="操作日志查询" data-options="border:false,singleSelect:true,collapsible:false,striped:true,fitColumns:true">
    <thead>
        <tr>
            <th data-options="field:'caozuoyuan'">
                操作人员
            </th>
            <th data-options="field:'rizhishijian'">
                操作时间
            </th>
            <th data-options="field:'rizhineirong'">
                记录内容
            </th>
        </tr>
    </thead>
</table>
